package cn.com.pc.content.domain.metadata;

import cn.com.pc.content.domain.Biz;
import cn.com.pc.content.domain.content.ContentType;
import cn.com.pc.content.domain.Site;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface ContentPropertyRepository extends JpaRepository<ContentProperty, Long> {
    ContentProperty findByNameAndSiteAndBizAndContentTypeAndDeleted(String name, Site site, Biz biz, ContentType contentType, boolean deleted);

    boolean existsByNameAndSiteAndContentTypeAndDataTypeNotAndDeleted(String name, Site site, ContentType contentType, ContentDataType dataType, boolean deleted);
}
